﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

[Serializable]
public class InitSkill
{
    public long id;
    public string name;
    /// <summary>
    /// 技能伤害 百分比
    /// </summary>
    public int damage;
    /// <summary>
    /// 伤害类型 0:物理伤害   1:魔法伤害
    /// </summary>
    public int damage_type;
    /// <summary>
    /// 范围  0:单个   1:多个 2.全体
    /// </summary>
    public int range;
    public string info;
}

public class InitSkillMgr
{
    public static Dictionary<long, InitSkill> Dict { get; private set; }

    public static void Load()
    {
        List<InitSkill> initRoles = StaticDataReader.LoadJsonFromFile<InitSkill>("static_skill");
        if (initRoles != null)
        {
            Dict = new Dictionary<long, InitSkill>(initRoles.Count);
            for(int i=0; i<initRoles.Count; i++)
            {
                Dict.Add(initRoles[i].id, initRoles[i]);
            }
        }
        else
        {
            Dict = new Dictionary<long, InitSkill>();
        }
    }
}
